<template>
  <div class="index-container">
    <div class="title">
      <span>欢迎来到，模拟题库！</span>
      <img src="../../assets/imgs/300.jpg" alt="" />
    </div>
    <div class="operate">
     
      <van-collapse v-model="activeNames" accordion > 
        <van-collapse-item title="公共题1 数据库" name="1">
          <van-button type="primary" style="margin: 3px 0;" round block @click="handleRoute('Databaseradio')">单选题</van-button>
      <van-button type="info" style="margin: 3px 0;"  round block @click="handleRoute('Databasemultiplechoice')">多选题</van-button>
      <van-button type="warning"  style="margin: 3px 0;" round block @click="handleRoute('Databasedetermine')">判断题</van-button>
        </van-collapse-item>
        <van-collapse-item title=" 公共题2 中间件及规章制度" name="2">
          <van-button type="primary" style="margin: 3px 0;"  round block @click="handleRoute('Middlewareradio')">单选题</van-button>
      <van-button type="info" style="margin: 3px 0;"  round block @click="handleRoute('MiddlewareMultipleChoice')">多选题</van-button>
      <van-button type="warning" style="margin: 3px 0;"  round block @click="handleRoute('Middlewaredetermine')">判断题</van-button>
        </van-collapse-item>
        <van-collapse-item title="公共题3 安规" name="3">
          <van-button type="primary" style="margin: 3px 0;"  round block @click="handleRoute('Safetyregulationsradio')">单选题</van-button>
      <van-button type="info" style="margin: 3px 0;"  round block @click="handleRoute('Safetyregulationsmultiplechoice')">多选题</van-button>
      <van-button type="warning"   style="margin: 3px 0;" round block @click="handleRoute('Safetyregulationsdetermine')">判断题</van-button>
        </van-collapse-item>
  <van-collapse-item title="专业题 档案管理" name="4">
     <van-button type="primary" style="margin: 3px 0;"  round  block @click="handleRoute('Radio')">单选题</van-button>
      <van-button type="info"  style="margin: 3px 0;"  round block @click="handleRoute('Multiplechoice')">多选题</van-button>
      <van-button type="warning" style="margin: 3px 0;"  round  block @click="handleRoute('Determine')">判断题</van-button>
  </van-collapse-item>
  <van-collapse-item title="模拟考试(缓慢开通中)" name="5">
    <!-- <van-button type="primary" style="margin: 3px 0;"  round  block @click="handleRoute('Simulatedexam')">模拟考试</van-button> -->
    <!-- <van-button type="primary" style="margin: 3px 0;"  round  block @click="handleRoute('Simulatedexam')">模拟考试</van-button> -->

  </van-collapse-item>

</van-collapse>
    </div>
  </div>
</template>

<script>
// import { getExamination_pd } from '../../api/home.js'
export default {
  data() {
    return {
      activeNames: '',
    }
  },
  computed: {},
  mounted() {
    this.getList()
  },
  methods: {
    getList() {
      // let params = {
      //   size: 20
      // }
      // getExamination_pd(params).then(result => console.log(result))
    },
    handleRoute(route) {
      this.$router.push({
        name: route
      })
    }
  }
}
</script>

<style lang="less" scoped>
.index-container {
  width: 100%;
  height: 100vh;
  background: #4e6ef2;
  color: #fff;
  overflow: hidden;
  box-sizing: border-box;
  .title {
    width: 100%;
    height: 240px;
    font-size: 25px;
    text-align: center;
    margin-top: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    img {
      margin-top: 20px;
      border-radius: 50%;
      width: 200px;
      height: 200px;
    }
  }
  .operate {

    width: 310px;
    height: 300px;
    // border: 1px solid #eee;
    margin: 0 auto;
    background-color: rgba(80, 78, 78, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-around;
  }
}
::v-deep .van-cell{
  background-color: #263d77;
  color: #fff;
}
::v-deep .van-collapse-item__content{
  background-color: #263d77;
  color: #fff;
}
</style>
